
# Enemy.rb
# The machine Star Fighter.

require 'game/Fighter'

class Enemy < Fighter

  def initialize(holder, options={})
    super(holder, options)

    @positive_damage = @negative_damage = @player_killed = 0
    @data[:positive] = @positive_damage
    @data[:negative] = @negative_damage
    @data[:victory]  = @victory
  end

  # Define the enemy's brain.
  def actions
    init(a_then_b(enemy_on_sight?(turn_right, turn_left), 
                  a_then_b(stop, a_then_b(accelerate, stop))))
  end

end
